From: Guido Günther Date: Sun, 4 Jan 2026 12:07:26 +0000 (+0100) Subject: mixer-stream: Allow to update port list X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2^2^2^2^2~12 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9c5a59337ab53caebcae295d0b14a4a3dc62062f;p=gnome-shell.git mixer-stream: Allow to update port list Signed-off-by: Guido Günther Origin: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 Bug: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/34 Bug-Debian: https://bugs.debian.org/1126514 Applied-upstream: gnome-shell 50, commit:798230599950607ec285daecd070f5bcb28580e4 Gbp-Pq: Topic libgvc Gbp-Pq: Name mixer-stream-Allow-to-update-port-list.patch --- diff --git a/subprojects/gvc/gvc-mixer-stream.c b/subprojects/gvc/gvc-mixer-stream.c index 038281772..83963cc28 100644 --- a/subprojects/gvc/gvc-mixer-stream.c +++ b/subprojects/gvc/gvc-mixer-stream.c @@ -624,9 +624,13 @@ gvc_mixer_stream_set_ports (GvcMixerStream *stream, GList *ports) { g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), FALSE); - g_return_val_if_fail (stream->priv->ports == NULL, FALSE); - stream->priv->ports = g_list_sort (ports, (GCompareFunc) sort_ports); + if (stream->priv->ports) { + g_list_free_full (stream->priv->ports, (GDestroyNotify) free_port); + stream->priv->ports = NULL; + } + if (ports) + stream->priv->ports = g_list_sort (ports, (GCompareFunc) sort_ports); return TRUE; }